/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cafe.DataObject;

import java.util.Date;

/**
 *
 * @author root
 */
public class Bill extends IdObject {

    private Date date;

    private String customerId;

    private long totalCost;

    private boolean isPaid;

    public Bill() {}
    
    public Bill(Date date, String cusId, long total, boolean isPaid) {
        this.date = date;
        this.customerId = cusId;
        this.totalCost = total;
        this.isPaid = isPaid;
    }
    
    /**
     * @return the date
     */
    public Date getDate() {
        return date;
    }

    /**
     * @param date the date to set
     */
    public void setDate(Date date) {
        this.date = date;
    }

    /**
     * @return the customerId
     */
    public String getCustomerId() {
        return customerId;
    }

    /**
     * @param customerId the customerId to set
     */
    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    /**
     * @return the totalCost
     */
    public long getTotalCost() {
        return totalCost;
    }

    /**
     * @param totalCost the totalCost to set
     */
    public void setTotalCost(long totalCost) {
        this.totalCost = totalCost;
    }

    /**
     * @return the isPaid
     */
    public boolean isPaid() {
        return isPaid;
    }

    /**
     * @param isPaid the isPaid to set
     */
    public void setIsPaid(boolean isPaid) {
        this.isPaid = isPaid;
    }
    
    public Object[] toObjectArray(){
        Object[] arr = new  Object[5] ;
       
        arr[0] = this.id;
        arr[1] = this.date;
        arr[2] = this.customerId;
        arr[3] = this.totalCost;
        arr[4] = this.isPaid;
        
        return arr;
    }
}
